.class Lcom/nemustech/regina/DialogCare$RGWRowNumAdapter;
.super Landroid/widget/BaseAdapter;
.source "DialogCare.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/nemustech/regina/DialogCare;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "RGWRowNumAdapter"
.end annotation


# instance fields
.field private curRowNum:I

.field private hasPage:Z

.field private rowNumArr:[I

.field final synthetic this$0:Lcom/nemustech/regina/DialogCare;


# direct methods
.method public constructor <init>(Lcom/nemustech/regina/DialogCare;I)V
    .locals 8
    .parameter
    .parameter "curRowNum"

    .prologue
    .line 303
    iput-object p1, p0, Lcom/nemustech/regina/DialogCare$RGWRowNumAdapter;->this$0:Lcom/nemustech/regina/DialogCare;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 304
    iput p2, p0, Lcom/nemustech/regina/DialogCare$RGWRowNumAdapter;->curRowNum:I

    .line 306
    invoke-static {p1}, Lcom/nemustech/regina/DialogCare;->access$100(Lcom/nemustech/regina/DialogCare;)Lcom/nemustech/regina/ResourceCare;

    move-result-object v6

    const v7, 0x7f060047

    invoke-virtual {v6, v7}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v3

    .line 307
    .local v3, oneRowHeight:I
    invoke-static {p1}, Lcom/nemustech/regina/DialogCare;->access$100(Lcom/nemustech/regina/DialogCare;)Lcom/nemustech/regina/ResourceCare;

    move-result-object v6

    const v7, 0x7f060002

    invoke-virtual {v6, v7}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v1

    .line 308
    .local v1, margin:I
    invoke-static {p1}, Lcom/nemustech/regina/DialogCare;->access$200(Lcom/nemustech/regina/DialogCare;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v6

    invoke-static {v6}, Lcom/nemustech/regina/RUtils;->getScreenHeightAvailable(Landroid/content/Context;)I

    move-result v6

    mul-int/lit8 v7, v1, 0x4

    sub-int/2addr v6, v7

    div-int v2, v6, v3

    .line 310
    .local v2, maxRowNum:I
    const/4 v6, 0x1

    sub-int v6, v2, v6

    new-array v6, v6, [I

    iput-object v6, p0, Lcom/nemustech/regina/DialogCare$RGWRowNumAdapter;->rowNumArr:[I

    .line 312
    const/4 v4, 0x1

    .line 313
    .local v4, value:I
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    iget-object v6, p0, Lcom/nemustech/regina/DialogCare$RGWRowNumAdapter;->rowNumArr:[I

    array-length v6, v6

    if-ge v0, v6, :cond_0

    .line 314
    iget-object v6, p0, Lcom/nemustech/regina/DialogCare$RGWRowNumAdapter;->rowNumArr:[I

    add-int/lit8 v5, v4, 0x1

    .end local v4           #value:I
    .local v5, value:I
    aput v4, v6, v0

    .line 313
    add-int/lit8 v0, v0, 0x1

    move v4, v5

    .end local v5           #value:I
    .restart local v4       #value:I
    goto :goto_0

    .line 316
    :cond_0
    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 332
    iget-object v0, p0, Lcom/nemustech/regina/DialogCare$RGWRowNumAdapter;->rowNumArr:[I

    array-length v0, v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "position"

    .prologue
    .line 337
    const/4 v0, 0x0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 366
    int-to-long v0, p1

    return-wide v0
.end method

.method public getRowNumArr()[I
    .locals 1

    .prologue
    .line 323
    iget-object v0, p0, Lcom/nemustech/regina/DialogCare$RGWRowNumAdapter;->rowNumArr:[I

    return-object v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 8
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    .line 343
    move-object v2, p2

    .line 344
    .local v2, row:Landroid/view/View;
    if-nez v2, :cond_0

    .line 345
    iget-object v5, p0, Lcom/nemustech/regina/DialogCare$RGWRowNumAdapter;->this$0:Lcom/nemustech/regina/DialogCare;

    invoke-static {v5}, Lcom/nemustech/regina/DialogCare;->access$200(Lcom/nemustech/regina/DialogCare;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v5

    invoke-virtual {v5}, Lcom/nemustech/regina/ReginaLauncher;->getLayoutInflater()Landroid/view/LayoutInflater;

    move-result-object v0

    .line 346
    .local v0, inflator:Landroid/view/LayoutInflater;
    const v5, 0x7f030008

    const/4 v6, 0x0

    const/4 v7, 0x1

    invoke-virtual {v0, v5, v6, v7}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v2

    .line 349
    .end local v0           #inflator:Landroid/view/LayoutInflater;
    :cond_0
    const v5, 0x7f090019

    invoke-virtual {v2, v5}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout;

    .line 350
    .local v1, lLayoutSelectRowNum:Landroid/widget/LinearLayout;
    const v5, 0x7f09001a

    invoke-virtual {v2, v5}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/TextView;

    .line 351
    .local v4, tvSelectRowNum:Landroid/widget/TextView;
    iget-object v5, p0, Lcom/nemustech/regina/DialogCare$RGWRowNumAdapter;->rowNumArr:[I

    aget v5, v5, p1

    invoke-static {v5}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    .line 352
    .local v3, rowNum:Ljava/lang/String;
    invoke-virtual {v4, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 354
    iget-object v5, p0, Lcom/nemustech/regina/DialogCare$RGWRowNumAdapter;->rowNumArr:[I

    aget v5, v5, p1

    iget v6, p0, Lcom/nemustech/regina/DialogCare$RGWRowNumAdapter;->curRowNum:I

    if-ne v5, v6, :cond_1

    .line 355
    const/high16 v5, -0x1

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setTextColor(I)V

    .line 360
    :goto_0
    return-object v2

    .line 357
    :cond_1
    const/high16 v5, -0x100

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setTextColor(I)V

    goto :goto_0
.end method

.method public setCurRowNum(I)V
    .locals 0
    .parameter "curRowNum"

    .prologue
    .line 327
    iput p1, p0, Lcom/nemustech/regina/DialogCare$RGWRowNumAdapter;->curRowNum:I

    .line 328
    return-void
.end method

.method public setHasPage(Z)V
    .locals 0
    .parameter "hasPage"

    .prologue
    .line 319
    iput-boolean p1, p0, Lcom/nemustech/regina/DialogCare$RGWRowNumAdapter;->hasPage:Z

    .line 320
    return-void
.end method
